Colin Walters [Mon, 9 May 2022 18:52:26 +0000 (14:52 -0400)]
tests/inst: Add .gitignore
Need this now that it is it's own workspace.
Colin Walters [Mon, 9 May 2022 16:57:40 +0000 (12:57 -0400)]
tests/inst: Fix install rules for ostree-rs merger
`tests/inst` became its own workspace.
Colin Walters [Fri, 6 May 2022 20:46:46 +0000 (16:46 -0400)]
cfg.mk: Don't even look at rust-bindings/
It's really tempting to remove `make syntax-check`, it has very
very rarely found any real problems.
But anyways, just exclude all the binding code because it trips
up random problems we simply don't care about like mentions of
`O_NDELAY` in the `GLib-2.0.gir`.
Colin Walters [Thu, 31 Mar 2022 22:53:31 +0000 (18:53 -0400)]
build-sys: Adjust for merge of ostree-rs
Fix up the paths for the crates now that the Rust bindings are in
`rust/`.
We can't today include the test suite because it depends on `ostree-rs-ext`
which would make everything circular.
(Building that now requires a separate `cd tests/inst && cargo build`)
Colin Walters [Tue, 26 Apr 2022 23:30:01 +0000 (19:30 -0400)]
Add a `repo()` accessor to `TransactionGuard`
I want to write APIs that *require* the caller to have set up
an ostree transaction. It's natural to require passing a guard
to do so. But then we want an accessor for the repo.
Colin Walters [Wed, 6 Apr 2022 13:49:58 +0000 (09:49 -0400)]
lib: Run `cargo fmt`
Prep for merge into ostree, where we want to run `cargo fmt` checks
in CI.
Luca BRUNO [Fri, 4 Mar 2022 14:28:36 +0000 (14:28 +0000)]
ostree: release 0.13.7
Luca BRUNO [Fri, 4 Mar 2022 14:28:35 +0000 (14:28 +0000)]
ostree: manually patch generated files
This manually adds a missing `ToGlibPtr` import, which seems to be result
of some bugs in `gir` code-generation.
Luca BRUNO [Fri, 4 Mar 2022 14:28:34 +0000 (14:28 +0000)]
ostree: refresh after gir bump
Luca BRUNO [Fri, 4 Mar 2022 14:28:33 +0000 (14:28 +0000)]
ostree/cargo: bump to ostree-sys 0.9.2
Luca BRUNO [Fri, 4 Mar 2022 10:35:03 +0000 (10:35 +0000)]
ostree-sys: release 0.9.2
Luca BRUNO [Fri, 4 Mar 2022 10:35:02 +0000 (10:35 +0000)]
ostree-sys: refresh after gir bump
Luca BRUNO [Fri, 4 Mar 2022 10:35:01 +0000 (10:35 +0000)]
gir-files: bump to v2022.2
Colin Walters [Sat, 26 Feb 2022 13:46:50 +0000 (08:46 -0500)]
repo: Add `query_file` API
The underlying `ostree_repo_load_file()` API has the caller pass
`NULL` for output arguments it doesn't want. This isn't sanely
bindable in Rust - what the generator does is always request
all values, but maps them all to `Option<T>`.
The main cases are where a user wants either metadata, or both
metadata and content. This API gives just metadata; it's a
bit more efficient as we don't need to open the file, and doesn't
require the caller to `unwrap()`.
Colin Walters [Thu, 17 Feb 2022 23:36:43 +0000 (18:36 -0500)]
Add manual bindings for MutableTree reading
I'm trying to debug a problem in ostree-rs-ext, and it's
handy to be able to do `dbg!(mtree.copy_files())`.
Colin Walters [Thu, 10 Feb 2022 14:08:58 +0000 (09:08 -0500)]
Release 0.13.6
Colin Walters [Wed, 9 Feb 2022 23:41:31 +0000 (18:41 -0500)]
Fast-track fix for `ostree_gpg_verify_result_get_all()`
This cherry picks just the changes from
https://github.com/ostreedev/ostree/pull/2537
We don't need to wait to respin a new ostree release just
for this.
Colin Walters [Fri, 4 Feb 2022 00:59:09 +0000 (19:59 -0500)]
Release 0.13.5
Colin Walters [Thu, 3 Feb 2022 17:40:46 +0000 (12:40 -0500)]
Add `COMMIT_META_CONTAINER_CMD` constant
Today we hardcode `/bin/bash` in
https://github.com/coreos/coreos-assembler/blob/
2088d24884771093101d95f915c921505128ef76/src/cmd-build#L405
But that breaks the concept of a bidirectional bridge between
container image and ostree commit because this little bit of
knowledge is encoded at the buildsystem side.
This metadata key is intended to be written into an ostree commit,
and then we will use it automatically in `container encapsulate`.
The "source of truth" for this key will hence be able live in the same
place that's generating the ostree commit.
The more "proper" place for this is probably alongside the other
constants in the libostree core C code. But that's tedious and
slow to release. And Rust is the future. And we've been slowly
adding more "core ostree" functionality here.
Colin Walters [Thu, 3 Feb 2022 13:54:37 +0000 (08:54 -0500)]
repo: Add two more cap-std APIs
Followup to the previous PR. I realized now with `io_lifetimes`
we can offer a safe `dfd_borrow()` that *borrows* the file descriptor
for the repository. (In contrast to the current `.dfd()` that returns
the raw version)
Building on that, add another API that re-acquires a `Dir` instance.
(In the future in theory we could optimize this more by knowing
whether or not the repo was constructed via cap-std, and perhaps
in theory synthesize a `&Dir` reference, but I don't think we
need that now)
Colin Walters [Wed, 2 Feb 2022 22:47:52 +0000 (17:47 -0500)]
Add a `cap-std-apis` feature with open/create
I'm trying to make more use of `cap-std` in our stack, and
this will be a key enabling API.
Actually a notable side benefit of this is that we don't need
to teach the ostree C code itself to use `openat2`, we inherit
cap-std's setup.
All of the internal ostree code using the prior `openat()` should
continue to work.
I only did basic sanity checking of this; there may be bugs
in other APIs.
Colin Walters [Wed, 5 Jan 2022 23:14:42 +0000 (18:14 -0500)]
Release 0.13.4
Colin Walters [Wed, 15 Dec 2021 18:57:54 +0000 (13:57 -0500)]
repo: Add an API to read and parse directory metadata
The fact that the uid/gid/mode are big endian bit me when I was
trying to parse this "by hand" in ostree-rs-ext.
Let's add a footgun-free API for this.
(And yeah, we should probably do the same for the other variant types)
Luca BRUNO [Wed, 1 Dec 2021 17:04:08 +0000 (17:04 +0000)]
ci: add jobs for MSRV checks and linting
This adds two jobs in order to check minimum toolchain compatibility,
and for overall linting.
Luca BRUNO [Wed, 1 Dec 2021 15:18:47 +0000 (15:18 +0000)]
lib: run rustfmt
Luca BRUNO [Wed, 1 Dec 2021 15:13:57 +0000 (15:13 +0000)]
lib: fix new clippy warnings
This fixes the following warnings highlighted by clippy:
* https://rust-lang.github.io/rust-clippy/master/index.html#needless_question_mark
* https://rust-lang.github.io/rust-clippy/master/index.html#redundant_closure
* https://rust-lang.github.io/rust-clippy/master/index.html#single_component_path_imports
Luca BRUNO [Tue, 23 Nov 2021 08:38:13 +0000 (08:38 +0000)]
sys/cargo: refresh manifest
This updates stale dependencies and remove leftover settings.
Manuel Stühn [Tue, 23 Nov 2021 13:38:06 +0000 (14:38 +0100)]
Update impl Display, omit to_string, change wording
Manuel Stühn [Tue, 16 Nov 2021 11:10:50 +0000 (12:10 +0100)]
add ObjectDetails-struct and use it in list_objects-function
Manuel Stühn [Tue, 16 Nov 2021 10:28:38 +0000 (11:28 +0100)]
update result type
Manuel Stühn [Tue, 16 Nov 2021 10:27:50 +0000 (11:27 +0100)]
switch from if-else to match
Manuel Stühn [Tue, 16 Nov 2021 08:17:02 +0000 (09:17 +0100)]
implement list_objects-function an test
Luca BRUNO [Thu, 28 Oct 2021 12:31:57 +0000 (12:31 +0000)]
sysroot: support create and load actions on builder
This splits the builder completion step into separate actions for
creating/loading a sysroot.
It also introduces a roundtrip test over a freshly-created empty
sysroot.
Luca BRUNO [Wed, 27 Oct 2021 09:45:34 +0000 (09:45 +0000)]
sysroot: add a builder object
This adds a `SysrootBuilder` in order to allow consumers to load
a configured `Sysroot` in an ergonomic way. It tries to prevent
logic bugs coming from handling half-initialized entities.
Colin Walters [Fri, 22 Oct 2021 13:38:09 +0000 (09:38 -0400)]
repo: Add `require_rev` method
The `resolve_rev` C method should really have been
`resolve_rev_optional` from the start - it is more obviously wrong
in Rust because the input parameter `allows_noent` controls
whether the returned `Option` can ever be `None`.
I debated adding this to the C bindings, and may still do so,
but eh it's faster to write + ship in Rust, and the future of ostree is
Rust anyways.
Colin Walters [Wed, 6 Oct 2021 16:49:00 +0000 (12:49 -0400)]
(cargo-release) start next development iteration 0.13.4-alpha.0
Colin Walters [Wed, 6 Oct 2021 16:48:23 +0000 (12:48 -0400)]
(cargo-release) version 0.13.3
Colin Walters [Wed, 6 Oct 2021 13:51:02 +0000 (09:51 -0400)]
Bump ostree-sys version
Colin Walters [Wed, 6 Oct 2021 13:48:22 +0000 (09:48 -0400)]
Update to 2021.5
Colin Walters [Thu, 30 Sep 2021 21:29:34 +0000 (17:29 -0400)]
(cargo-release) version 0.13.3-alpha.1
Colin Walters [Thu, 30 Sep 2021 21:25:46 +0000 (17:25 -0400)]
(cargo-release) version 0.13.2
Colin Walters [Tue, 28 Sep 2021 19:37:26 +0000 (15:37 -0400)]
repo: Add `auto_transaction` and `TransactionGuard`
This gives auto-cancelling semantics on `Drop`, plus a nicer
`.commit()` method on the transaction.
Matches the currently private `_OstreeRepoAutoTransaction` in the C
library.
Colin Walters [Thu, 23 Sep 2021 14:11:53 +0000 (10:11 -0400)]
(cargo-release) start next development iteration 0.13.2-alpha.0
Colin Walters [Thu, 23 Sep 2021 14:11:17 +0000 (10:11 -0400)]
(cargo-release) version 0.13.1
Colin Walters [Tue, 21 Sep 2021 12:59:17 +0000 (08:59 -0400)]
repo: Expose dfd_as_file()
The `dfd()` API returns just an integer. Add a safe API that
makes a copy of the fd. What we really want here is `BorrowedFd` from
https://github.com/rust-lang/rfcs/blob/master/text/3128-io-safety.md
but that isn't here yet.
Colin Walters [Mon, 20 Sep 2021 21:53:16 +0000 (17:53 -0400)]
Make `SePolicy` have `Send`
It's safe to send between threads, and I want to do so
in ostree-rs-ext to send to a tokio worker thread.
Colin Walters [Thu, 9 Sep 2021 15:52:21 +0000 (11:52 -0400)]
lib: Reexport libc::AT_FDCWD
Useful with `Repo::open_at()`.
Right now ostree-rs-ext pulls in libc for this and `fgetxattr`,
but the latter should go into nix.
Colin Walters [Thu, 9 Sep 2021 12:24:58 +0000 (08:24 -0400)]
sys: Release 0.9.0
Should have been bumped in the previous commit.
Colin Walters [Thu, 26 Aug 2021 01:21:20 +0000 (21:21 -0400)]
Release 0.13
Just an update to support libostree v2021.4, but bumping semver
because a few APIs (correctly) gained `Option<T>`.
Colin Walters [Wed, 25 Aug 2021 19:50:14 +0000 (15:50 -0400)]
Release 0.12.3
No major changes, just exporting the `ffi` bits.
Colin Walters [Mon, 23 Aug 2021 19:26:08 +0000 (15:26 -0400)]
Cargo.toml: Bump to glib 0.14.4
Not strictly required for this repo, but it has the new variant
bindings we want in ostree-rs-ext.
Colin Walters [Fri, 6 Aug 2021 20:35:13 +0000 (16:35 -0400)]
lib: Export ffi too
Matching how gtk-rs does it. Right now rpm-ostree does depend
on interacting with `ostree-sys` via the cxxrs bits.
Colin Walters [Fri, 6 Aug 2021 15:00:33 +0000 (11:00 -0400)]
Release 0.12.2
```
Colin Walters (8):
Add 2021.3 feature
Re-export glib, gio
Deny unused results, warn on missing docs (except auto/)
Add new GLib 0.14 variant types for metadata types
Fix build with --features=v2021_3, use in CI by default
Add more documentation for --features=v2021_3
Use glib-sys via re-exported `glib::ffi` (and similar for gio)
Release 0.12.2
Luca BRUNO (5):
cargo: fix version in features chain
lib: fix 'dox' feature
cargo: point to docs.rs and clean up
ostree: release 0.12.1
cargo: bump ostree-sys to 0.8.1
```
Colin Walters [Tue, 3 Aug 2021 19:41:30 +0000 (15:41 -0400)]
Use glib-sys via re-exported `glib::ffi` (and similar for gio)
In general only `-sys` crates should depend on other `-sys`
crates. IOW for us, `ostree-sys` depends on `glib-sys`.
By using the re-export, we avoid needing to keep a version lock
between `glib` and `glib-sys` in our main crate. And similar
is true of our higher level reverse dependencies (e.g. `ostree-rs-ext`).
Also weaken our dependency to `0.14` as that's clearer.
Colin Walters [Tue, 3 Aug 2021 14:52:21 +0000 (10:52 -0400)]
Fix build with --features=v2021_3, use in CI by default
It's a huge trap for us not to build with the latest ostree feature
on, I didn't have my IDE configured for it, and CI didn't have
it on.
The previous bump to glib 0.14 broke the Sign code.
Colin Walters [Tue, 3 Aug 2021 19:01:10 +0000 (15:01 -0400)]
Add more documentation for --features=v2021_3
My previous pass was at the default feature level.
Colin Walters [Mon, 2 Aug 2021 18:41:22 +0000 (14:41 -0400)]
Add new GLib 0.14 variant types for metadata types
This way it's more convenient for downstream crates like ostree-rs-ext
to convert loaded variants.
TODO: Can we add a feature for the `gvariant` crate and expose via
that too?
Colin Walters [Mon, 2 Aug 2021 19:51:49 +0000 (15:51 -0400)]
Deny unused results, warn on missing docs (except auto/)
And add basic docs for our manually implemented functions.
Luca BRUNO [Mon, 2 Aug 2021 15:49:08 +0000 (15:49 +0000)]
cargo: bump ostree-sys to 0.8.1
Luca BRUNO [Mon, 2 Aug 2021 15:32:40 +0000 (15:32 +0000)]
ostree: release 0.12.1
Luca BRUNO [Mon, 2 Aug 2021 15:17:31 +0000 (15:17 +0000)]
cargo: point to docs.rs and clean up
This removes stale URLs, pointing to the auto-built docpages at
docs.rs and sorting manifest entries.
Luca BRUNO [Mon, 2 Aug 2021 15:15:51 +0000 (15:15 +0000)]
lib: fix 'dox' feature
This makes sure docs can be properly built when using the 'dox'
feature. It should fix auto-builds on docs.rs.
Luca BRUNO [Mon, 2 Aug 2021 14:36:33 +0000 (14:36 +0000)]
cargo: fix version in features chain
This fixes the definition of the `v2016_4` feature.
It restores the chain of versions so that 2016.3 symbols can be
actually reached from newer features/versions.
Colin Walters [Sat, 31 Jul 2021 21:15:03 +0000 (17:15 -0400)]
Re-export glib, gio
Re-export our dependencies. See https://gtk-rs.org/blog/2021/06/22/new-release.html
"Dependencies are re-exported". Users will need e.g. `gio::File`, so this avoids
them needing to update matching versions.
Closes: https://github.com/ostreedev/ostree-rs/issues/12
Colin Walters [Mon, 26 Jul 2021 16:39:50 +0000 (12:39 -0400)]
Add 2021.3 feature
(We should add doing this as a SOP for ostree releases)
Colin Walters [Mon, 26 Jul 2021 16:08:29 +0000 (12:08 -0400)]
Bump versions
The glib 0.14 change is semver incompatible.
Colin Walters [Thu, 24 Jun 2021 21:38:16 +0000 (17:38 -0400)]
Update to glib 0.14
An intimidating spam of compiler errors at the start, but the
biggest was handling the new convention of `ostree_sys::` => `ffi::`.
This will require a semver bump of course.
Colin Walters [Mon, 26 Jul 2021 14:14:48 +0000 (10:14 -0400)]
ci: Fix buildroot to use new official image
Which is maintained and has updated rust.
Colin Walters [Mon, 26 Jul 2021 12:01:14 +0000 (08:01 -0400)]
Mark src/auto/* as generated
Luca BRUNO [Wed, 23 Jun 2021 17:12:40 +0000 (17:12 +0000)]
repo_transaction_stats: move to a manual implementation
This moves `RepoTransactionStats` into a manually implemented
source file in order to provide getters to expose relevant
fields.
Colin Walters [Thu, 15 Apr 2021 20:41:15 +0000 (16:41 -0400)]
Bump sys version requirement
Colin Walters [Thu, 15 Apr 2021 20:40:05 +0000 (16:40 -0400)]
Bump versions
Colin Walters [Fri, 9 Apr 2021 15:18:36 +0000 (15:18 +0000)]
Update to 2021.2
Sync to https://github.com/ostreedev/ostree/releases/tag/v2021.2
Colin Walters [Thu, 8 Apr 2021 17:01:03 +0000 (17:01 +0000)]
ci: Add GH action to build
Colin Walters [Fri, 2 Apr 2021 13:47:02 +0000 (13:47 +0000)]
repo: Add concurrency=send
Ultimately a repo is just a file descriptor wrapper with some
cached data, etc. We can send it between threads, much like how
`gio::File` is `Send`.
Motivated by trying to write to a repo from a separate thread
in https://github.com/cgwalters/ostree-container
Felix Krull [Fri, 26 Mar 2021 19:44:02 +0000 (20:44 +0100)]
Update rustdoc-stripper
Felix Krull [Fri, 26 Mar 2021 19:40:53 +0000 (20:40 +0100)]
Bump all versions
Felix Krull [Fri, 26 Mar 2021 19:39:06 +0000 (20:39 +0100)]
Regenerate
Felix Krull [Fri, 26 Mar 2021 19:38:22 +0000 (20:38 +0100)]
Switch to patched ostree gir
Felix Krull [Fri, 26 Mar 2021 19:11:25 +0000 (20:11 +0100)]
Regenerate
Felix Krull [Fri, 26 Mar 2021 18:51:56 +0000 (19:51 +0100)]
Update OSTree-1.0.gir to 2021.1
Felix Krull [Fri, 26 Mar 2021 18:35:55 +0000 (19:35 +0100)]
Fix ostree gir file update
Felix Krull [Fri, 26 Mar 2021 18:33:55 +0000 (19:33 +0100)]
Update common gir files
Felix Krull [Sun, 18 Oct 2020 15:02:36 +0000 (17:02 +0200)]
Bump versions
Felix Krull [Sun, 18 Oct 2020 15:02:30 +0000 (17:02 +0200)]
Remove outdated sentence in readme
Felix Krull [Sun, 18 Oct 2020 15:00:28 +0000 (17:00 +0200)]
src: fix tests
Felix Krull [Sun, 18 Oct 2020 11:21:53 +0000 (13:21 +0200)]
src: manually implement SysrootDeployTreeOpts
Felix Krull [Sat, 17 Oct 2020 20:51:59 +0000 (22:51 +0200)]
ci: fix rawhide stages?
Felix Krull [Sat, 17 Oct 2020 20:19:52 +0000 (22:19 +0200)]
Switch to patched ostree gir
Felix Krull [Sat, 17 Oct 2020 19:37:40 +0000 (21:37 +0200)]
Regenerate based on new gir
Felix Krull [Thu, 15 Oct 2020 22:32:52 +0000 (00:32 +0200)]
gir: update OSTree gir
Felix Krull [Thu, 15 Oct 2020 22:32:42 +0000 (00:32 +0200)]
gir: update misc gir files
Felix Krull [Fri, 4 Sep 2020 12:08:12 +0000 (14:08 +0200)]
Update gir file to 2020.6
Felix Krull [Wed, 26 Aug 2020 20:18:00 +0000 (22:18 +0200)]
conf: anchor function name patterns to avoid unexpected exclusions
Felix Krull [Wed, 26 Aug 2020 19:59:52 +0000 (21:59 +0200)]
Bump versions
Felix Krull [Wed, 26 Aug 2020 19:50:43 +0000 (21:50 +0200)]
conf: ignore some more special-cased functions
Felix Krull [Wed, 26 Aug 2020 19:45:05 +0000 (21:45 +0200)]
src: add Checksum::from_bytes
Felix Krull [Wed, 26 Aug 2020 19:44:57 +0000 (21:44 +0200)]
conf: annotate ignores better
Felix Krull [Wed, 26 Aug 2020 17:45:32 +0000 (19:45 +0200)]
src: reimplement checksum hex and base64 en/decoding
This allows us to provide actually useful error handling
Felix Krull [Wed, 26 Aug 2020 08:13:01 +0000 (10:13 +0200)]
src: add support for write_deployments_with_options